var resDisplay = function(data){
    var str = '';
    if(data == true){
        str = '操作成功!';
    }else{
        str = '操作失败!';
    }
    setTimeout(function(){
        layer.msg(str);
        window.location.reload();
    },1000);
}

var request = function(data,func,method, url){
    layer.load();
    url    ? url    : url    = 'admin.php?ac=admin';
    method ? method : method = 'GET';
    data['op'] = 'start';
    $.ajax({
        dataType : 'json',
        url  : url,
        type : method,
        data : data,
        success: function(returnData){
            layer.closeAll();
            func(returnData.result);
        }
    });
}

var dateTimeFormate = function(time){
    return new Date(parseInt(time) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
}